]> dgit.raspbian.org Git - gnome-shell.git/commit
messageTray: improve bad-markup handling
authorDan Winship <danw@gnome.org>
Wed, 4 May 2011 15:15:45 +0000 (11:15 -0400)
committerDan Winship <danw@gnome.org>
Wed, 27 Jul 2011 13:29:03 +0000 (09:29 -0400)
commit7542e68b6fca5ad02459576b350149c97743675b
treef25aa9603aa6ffb7c5ba95b4370159d7b5eb233b
parent9003a34285bca138f456ec49b752a3c45517bc8f
messageTray: improve bad-markup handling

_fixMarkup() was supposed to be ensuring that the markup we passed to
clutter was correct, but it was validating the syntax incorrectly, and
wasn't checking that the markup was valid (or even well-formed). This
is bad because if you pass bad pango markup to
clutter_text_set_markup(), it will g_warn and drop the string on the
floor.

Fix by fixing up the regexps, and then calling Pango.parse_markup() on
the result, and just xml-escaping everything if parse_markup() fails.

https://bugzilla.gnome.org/show_bug.cgi?id=650298
js/ui/messageTray.js